
def getVolumeName(sDrivePath):
  import ctypes;
  sVolumeNameBuffer = ctypes.create_unicode_buffer(1024);
  iSuccess = ctypes.windll.kernel32.GetVolumeInformationW(
    ctypes.c_wchar_p(sDrivePath),
    sVolumeNameBuffer, ctypes.sizeof(sVolumeNameBuffer),
    None, None, None, None, None
  );
  return iSuccess and unicode(sVolumeNameBuffer.value) or None;
